package com.neu.service.klz;

import com.neu.dao.klz.KindDaoImpl;

import java.util.List;
import java.util.Map;

public class KindDaoService {
    private KindDaoImpl kindDao;
    public KindDaoService(){
        kindDao=new KindDaoImpl();
    }
    public List<Map<String,Object>> dofindByKname(){
        List<Map<String,Object>> list= null;
        try {
            list = kindDao.findByKname();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return list;
    }
    public boolean dosave(String k_name){
        boolean flag=false;
        try {
            int row=kindDao.save(k_name);
            if (row>0){
                flag=true;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return flag;

    }
}
